package com.slz3.business.module.orderManagement.ordRefund.steward;

import com.slz3.business.module.orderManagement.ordRefund.domain.OrdRefund;
import com.slz3.business.module.orderManagement.ordRefund.domain.OrdRefundCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class OrdRefundResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(OrdRefund.class).flatMap(ordRefund ->
                OrdRefundResController.add(req, ordRefund)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(OrdRefundCondition.class).flatMap(ordRefundCondition ->
                OrdRefundResController.delete(req, ordRefundCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(OrdRefund.class).flatMap(ordRefund ->
                OrdRefundResController.modify(req, ordRefund)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return OrdRefundResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return OrdRefundResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return OrdRefundResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(OrdRefundCondition.class).flatMap(ordRefundCondition ->
                OrdRefundResController.auditSubmit(req, ordRefundCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(OrdRefundCondition.class).flatMap(ordRefundCondition ->
                OrdRefundResController.audit(req, ordRefundCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(OrdRefundCondition.class).flatMap(ordRefundCondition ->
                OrdRefundResController.auditReject(req, ordRefundCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(OrdRefundCondition.class).flatMap(ordRefundCondition ->
                OrdRefundResController.usingEnable(req, ordRefundCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(OrdRefundCondition.class).flatMap(ordRefundCondition ->
                OrdRefundResController.usingDisable(req, ordRefundCondition)
        );
    }   

}
